package 狂神;

import java.util.Scanner;

/**
 * @ClassName: scanner02
 * @Auther: Drawin
 * @Date: 2021/11/1 22:41
 * @Description:
 */

public class scanner02 {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        System.out.println("使用nextLine方式接收:");

        if (scanner.hasNextLine()){
            String str= scanner.nextLine();
            System.out.println("输出的内容为："+str);
        }
        //next()不能得到带有空格的字符串
        scanner.close();
    }
}